{extend name="public:base" /}
{block name="action"}
<a href="{:url('create')}" class="btn btn-primary btn-w-m"><i class="fa fa-plus"></i> 添加</a>
{/block}
{/block}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight" xmlns="http://www.w3.org/1999/html">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <form method="get">
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input class="form-control form-control-sm" name="query" value="{$params['query']}"
                                           autocomplete="off" placeholder="输入企业名称进行搜索...">
                                    <div class="input-group-append">
                                        <button type="submit" class="btn btn-sm btn-primary"><i
                                                class="fa fa-search"></i> 搜索
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-stripped ">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>管理员账号</th>
                                <th>企业名称</th>
                                <th>联系方式</th>
                                <th>服务到期时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {notempty name="list"}
                            {volist name="list" id="vo" key="k"}
                            <tr>
                                <td>{$k}</td>
                                <td>{$vo['admin']?$vo['admin']['account']:""}</td>
                                <td>{$vo.name}</td>
                                <td>{$vo.mobile}</td>
                                <td>{$vo.service_expiration_time}</td>
                                <td class="project-actions">
                                    <a href="{:url('edit')}?id={$vo['id']}" class="btn btn-warning btn-sm detail"><i
                                            class="fa fa-edit"></i> 编辑 </a>
                                    <a href="{:url('delete', [],'json')}?id={$vo.id}"
                                       class="btn btn-danger btn-sm ajax-del"><i class="fa fa-trash-o"></i> 删除 </a>
                                    <a href="{:url('/admin/user/resetPassword',[],'json')}?id= {$vo['admin']['id']}"
                                       data-method="put"
                                       data-title="确认重置密码操作吗？"
                                       class="btn btn-primary btn-sm ajax-modal-dialog"><i class="fa fa-steam"></i> 重置密码
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/notempty}
                            </tbody>
                        </table>
                        {$list->render()}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
</script>
{/block}
{block name="css"}
<link rel="stylesheet" href="__ADMIN__/css/process-timeline.css">
{/block}